from django.db import models

# Create your models here.
# Company model includes name, address, city, state, country, phone, email, website and belongs to a user and belong to user, verbose name for all fields are defined
class Company(models.Model):
    name = models.CharField(max_length=100, verbose_name='Company Name')
    address = models.CharField(max_length=100, verbose_name='Address')
    # city = models.CharField(max_length=100, null=True, blank=True, verbose_name='City')
    # state = models.CharField(max_length=100, null=True, blank=True, verbose_name='State')
    # country = models.CharField(max_length=100, null=True, blank=True, verbose_name='Country')
    phone = models.CharField(max_length=100, verbose_name='Phone')
    # email = models.EmailField(max_length=100, null=True, blank=True, verbose_name='Email')
    # website = models.URLField(max_length=100, null=True, blank=True, verbose_name='Website')
    memo = models.TextField(max_length=1000, null=True, blank=True, verbose_name='Memo')
    user = models.ForeignKey('auth.User', on_delete=models.CASCADE)

    def __str__(self):
        return self.name
    
    class Meta:
        verbose_name = 'Company'
        verbose_name_plural = 'Companies'
    
    